|
1
|
|
|
/** |
|
2
|
|
|
Copyright 2018 June Hanabi |
|
3
|
|
|
|
|
4
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5
|
|
|
you may not use this file except in compliance with the License. |
|
6
|
|
|
You may obtain a copy of the License at |
|
7
|
|
|
|
|
8
|
|
|
http://www.apache.org/licenses/LICENSE-2.0 |
|
9
|
|
|
|
|
10
|
|
|
Unless required by applicable law or agreed to in writing, software |
|
11
|
|
|
distributed under the License is distributed on an "AS IS" BASIS, |
|
12
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13
|
|
|
See the License for the specific language governing permissions and |
|
14
|
|
|
limitations under the License. |
|
15
|
|
|
*/ |
|
16
|
|
|
|
|
17
|
|
|
import { Component } from '@angular/core'; |
|
18
|
|
|
import { SaveFileService } from "../../data/savefile.service"; |
|
19
|
|
|
import { SignData } from '../../data/savefile-expanded/fragments/SignData'; |
|
20
|
|
|
|
|
21
|
|
|
@Component({ |
|
22
|
|
|
selector: 'screen-area-signs', |
|
23
|
|
|
templateUrl: './area-signs.component.pug', |
|
24
|
|
|
styleUrls: ['./area-signs.component.scss'], |
|
25
|
|
|
}) |
|
26
|
|
|
export class AreaSignsComponent { |
|
27
|
|
|
|
|
28
|
|
|
constructor( |
|
29
|
|
|
public fileService: SaveFileService |
|
30
|
|
|
) { } |
|
31
|
|
|
|
|
32
|
|
|
get signs() { |
|
33
|
|
|
return this.fileService.fileDataExpanded.area.signs.signData; |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
addListItem() { |
|
37
|
|
|
this.fileService.fileDataExpanded.area.signs.signData.push(new SignData()); |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
remListItem(index: number) { |
|
41
|
|
|
this.fileService.fileDataExpanded.area.signs.signData.splice(index, 1); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
trackByFn(index: number) { |
|
45
|
|
|
return index; |
|
46
|
|
|
} |
|
47
|
|
|
} |
|
48
|
|
|
|